import json

txt = open("json.txt", "r", encoding="gbk").read()
a = json.loads(txt)

class UserInfo:
    __count = 0

    email = ""
    name = ""
    password = ""
    qq = ""

    def __init__(self, email, name, password, qq):
        UserInfo.__count += 1
        self.__count = UserInfo.__count
        self.email = email
        self.name = name
        self.password = password
        self.qq = qq

    def __repr__(self):
        return f"用户 {self.__count}：\"邮箱地址\"：\"{self.email}\"，\"姓名\"：\"{self.name}\"，\"密码\"：\"{self.password}\"，\"QQ 号码\"：\"{self.qq}\""

    def __str__(self):
        return f"用户 {self.__count}：\"邮箱地址\"：\"{self.email}\"，\"姓名\"：\"{self.name}\"，\"密码\"：\"{self.password}\"，\"QQ 号码\"：\"{self.qq}\""

def joinUsers(ls):
    ret = ''
    for i in ls:
        ret += i.__str__() + '\n'
    return ret[:-1]

ls = []    
for i in a:
    ls.append(UserInfo(i['email'], i['name'], i['password'], i['qq']))

print(joinUsers(ls))
